<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" />
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib prefix="frame" uri="http://www.framework.com/taglib"%>
<html>
<head>
	<title>公共平台</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- 样式文件的引入 -->
	<link href="${ctx}/commons/css/style.css" rel="stylesheet"
		  type="text/css" />
	<link rel="stylesheet" type="text/css"
		  href="${ctx}/commons/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css"
		  href="${ctx}/commons/themes/icon.css" />
	<link href="${ctx}/commons/js/uploadify/uploadify.css" rel="stylesheet"
		  type="text/css" />

	<!-- jqueryUI JS文件的引入 -->
	<script type="text/javascript"
			src="${ctx}/commons/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript"
			src="${ctx}/commons/js/jquery.easyui.min.js"></script>
	<script type="text/javascript"
			src="${ctx}/commons/js/easyui-extends-validate.js"></script>
	<script type="text/javascript"
			src="${ctx}/commons/js/uploadify/jquery.uploadify.min.js"></script>
	<!-- 开发使用的公用js方法 -->
	<script type="text/javascript" src="${ctx}/commons/js/common.js"></script>
	<!-- jqueryUI国际化 -->
	<script type="text/javascript"
			src="${ctx}/commons/js/easyui-lang-zh_CN.js"></script>
	<!-- 开发国际化的引用，主要完成后台信息在前台提示的国际化，一定要放在最后 -->
	<script type="text/javascript">
        var ctx = '${ctx}';
        var actionExt = "action";
        var i18n = new Object();
	</script>
	<script src="${ctx}/commons/js/i18n/message_zh_CN.js"
			type="text/javascript"></script>
</head>

<body>
<form name="addDataForm" id="addShopDataForm" action="${ctx}/business/shop/save">
	<input type="hidden" name="registerId" id="rId" value="${register.id}"/>
	<input type="hidden" name="image01" id="image01" value="${register.image01}"/>
	<table class="infoTable">
		<tbody>
		<tr>
			<th colspan="4" style="text-align:left">
				<strong>竞拍人基本信息</strong>
			</th>
		</tr>

		<tr>

			<th align="right" width="10%">单位名称/姓名:</th>
			<td colspan="3">${register.loginName}</td>
			<%--<th align="right" width="10%">服务类型:</th>--%>
			<%--<td colspan="3">${depositCategory}</td>--%>
		</tr>
		<tr>
			<th align="right" width="10%">竞拍人类型:</th>
			<td>${register.category==1?"自然人":"企业"}</td>
			<th align="right" width="10%">Email:</th>
			<td>${register.email}</td>
		</tr>
		<tr>
			<th align="right" width="10%">办公电话:</th>
			<td>${register.tel}</td>
			<th align="right" width="10%">手机号码:</th>
			<td>${register.mobile}</td>
		</tr>

		<tr>
			<th align="right" width="10%">开户行:</th>
			<td>${register.bank}</td>
			<th align="right" width="10%">账户:</th>
			<td>${register.account}</td>
		</tr>
		<tr>
			<th align="right" width="10%">邮编:</th>
			<td>${register.post}</td>
			<th align="right" width="10%">地址:</th>
			<td>${register.address}</td>
		</tr>

		<tr>

			<th align="right" width="10%">统一社会信用代码/自然人身份证号码:</th>
			<td colspan="3">${register.societyCode}</td>
		</tr>
		<tr>
			<th colspan="4" style="text-align:left">
				<strong>竞拍人认证信息</strong>
			</th>
		</tr>
		<tr>
			<th align="right" width="10%">竞拍人身份信息:</th>
			<c:if test="${empty register.image01}">
				<td colspan="3">无</td>
			</c:if>
			<c:if test="${not empty register.image01}">
				<td colspan="3"><a href="${ctx}/file_resource/image01/${register.image01}${image01.exeName}" target="_blank" class="easyui-linkbutton">图片浏览</a></td>
			</c:if>
		</tr>
		<tr>
			<th align="right" width="10%">注册承诺:</th>
			<c:if test="${empty register.image02}">
				<td colspan="3">无</td>
			</c:if>
			<c:if test="${not empty register.image02}">
				<td colspan="3"><a href="${ctx}/file_resource/image02/${register.image02}${image02.exeName}" target="_blank" class="easyui-linkbutton">图片浏览</a></td>
			</c:if>
		</tr>
		<%--<tr>--%>
		<%--<th align="right" width="10%">认证信息图片3</th>--%>
		<%--<c:if test="${empty register.image03}">--%>
		<%--<td colspan="3">无</td>--%>
		<%--</c:if>--%>
		<%--<c:if test="${not empty register.image03}">--%>
		<%--<td colspan="3"><a href="${ctx}/file_resource/image03/${register.image03}${image03.exeName}" target="_blank" class="easyui-linkbutton">图片浏览</a></td>--%>
		<%--</c:if>--%>
		<%----%>
		<%--</tr>--%>
		<%--<tr>--%>
		<%--<th align="right" width="10%">认证信息图片4</th>--%>
		<%--<c:if test="${empty register.image04}">--%>
		<%--<td colspan="3">无</td>--%>
		<%--</c:if>--%>
		<%--<c:if test="${not empty register.image04}">--%>
		<%--<td colspan="3"><a href="${ctx}/file_resource/image04/${register.image04}${image04.exeName}" target="_blank" class="easyui-linkbutton">图片浏览</a></td> --%>
		<%--</c:if>--%>
		<%----%>
		<%--</tr>--%>
		<%--<tr>--%>
		<%--<th align="right" width="10%">认证信息图片5</th>--%>
		<%--<c:if test="${empty register.image05}">--%>
		<%--<td colspan="3">无</td>--%>
		<%--</c:if>--%>
		<%--<c:if test="${not empty register.image05}">--%>
		<%--<td colspan="3"><a href="${ctx}/file_resource/image05/${register.image05}${image05.exeName}" target="_blank" class="easyui-linkbutton">图片浏览</a></td> --%>
		<%--</c:if>--%>
		<%--</tr>--%>
		<tr>
			<th colspan="4" style="text-align:left">
				<strong>竞拍人信息审核</strong>
			</th>
		</tr>
		<tr>
			<th align="right" width="10%">审核操作:</th>
			<td colspan="3">
				审核通过<input type="radio"  name="flag" value="1" id="flag"  />
				审核不通过<input type="radio" name="flag" value="2" id="flag" />
			</td>
		</tr>
		<tr>
			<th align="right" width="10%">审核信息</th>
			<td colspan="3">
				<textarea rows="5" style="width: 700px;" id="reason" name="reason" ></textarea><br/>
				<font color="red">注：150个字符以内</font>
			</td>
		</tr>


		<tr>
			<td colspan="4">
				<center>
					<a id="btnSubmit" href="#" class="easyui-linkbutton">提交</a>
				</center>
			</td>
		</tr>
		</tbody>
	</table>

</form>
<script type="text/javascript">
    /* $(function(){
         // $("#reason").attr("disabled","disabled");
          $('input:radio[name="flag"]').click(function(){
              var val = $('input:radio[name="flag"]:checked').val();
              if(val ==1){
                 $("#reason").val('');
               //  $("#reason").attr("disabled","disabled");
              }if(val==2){
               //  $("#reason").removeAttr("disabled");
              }
           });
     });*/

    <%--$(function(){--%>
    <%--if("${register.loginTypePWD}"=="1"){--%>
    <%--$("#loginTypePWD").attr("checked",true);--%>
    <%--}--%>
    <%----%>
    <%--if("${register.loginTypeCA}"=="1"){--%>
    <%--$("#loginTypeCA").attr("checked",true);--%>
    <%--}--%>
    <%--});--%>


    $("#btnSubmit").click(function() {
        var val = $('input:radio[name="flag"]:checked').val();
        var reason = $("#reason").val();
        if (val == null) {
            $.messager.alert('提示', '请确认审核是否通过！','info');
            return
        }else if(val == 2 && reason==''){
            $.messager.alert('提示', '请输入审核未通过原因！','info');
            return
        }
        else{
            audit();

        }
    });

    function audit(){
        var registerId=$('#rId').val();
        var flag = $('input:radio[name="flag"]:checked').val();
        var reason =$('#reason').val();
        $.ajax({
            data: {registerId:registerId,
                flag:flag,
                reason:reason
            },
            url:'${ctx}/template/register/audit',
            type:'post',
            datatype:'json',
            success:function(data){
                if(data.rows=="unLogin"){
                    $.messager.alert('提示', '用户未登陆，请登陆后再操作！','info');
                }else if(data.rows=="审核完成！"){
                    $.messager.alert('提示', '审核完成！','info',function(){
                        $("#mydialog3").dialog('close');
                    });
                }else if(data.rows=="注册用户id is null"){
                    $.messager.alert('提示', '注册用户id is null！','info',function(){
                        $("#mydialog3").dialog('close');
                    });
                }

                return false;// 加解return false解决Ie不跳转问题
            }
        });

    }
</script>
</body>
</html>